package com.tongtian.mychess;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    public static final String TAG ="MainActivity";

    private Button btnEnter;
    private Button btnBluetooth;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        btnEnter = (Button) findViewById(R.id.btnEnter);
        btnBluetooth = (Button) findViewById(R.id.btnBluetooth);

        btnEnter.setOnClickListener(this);
        btnBluetooth.setOnClickListener(this);


    }

    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch (v.getId()){
            case R.id.btnEnter:
                intent = new Intent(this,RJGameActivity.class);
                startActivity(intent);

                break;
            case R.id.btnBluetooth:
                intent = new Intent(this,GameActivity.class);
                startActivity(intent);

                break;

        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }



}
